<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/TX">
		<xsl:for-each select="TX_BODY">
			<infopost-request>
				<request-head>
					<xsl:for-each select="ENTITY/COM_ENTITY">
						<insu-id>
							<xsl:value-of select="Ins_Co_ID" />
						</insu-id>
						<trans-id>
							<xsl:value-of select="SvPt_Jrnl_No" />
						</trans-id>
						<post>
							<xsl:value-of select="CCBIns_ID" />
						</post>
						<agency-hand>
							<xsl:value-of select="CCB_EmpID" />
						</agency-hand>
						<!-- 交易发起渠道编号 -->
						<column12>
							<xsl:value-of select="TXN_ITT_CHNL_ID" />
						</column12>
						<!-- 交易发起渠道类别 -->
						<column13>
							<xsl:value-of select="TXN_ITT_CHNL_CGY_CODE" />
						</column13>
					</xsl:for-each>
					<bank>002</bank>
					<area>002</area>
					<branch />
					<authorized>root</authorized>
					<trans-type>104</trans-type>
					<xsl:for-each select="/TX/TX_HEADER">
						<trans-date>
							<xsl:value-of select="substring(SYS_REQ_TIME,1,8)" />
						</trans-date>
						<trans-time>
							<xsl:value-of select="substring(SYS_REQ_TIME,9,6)" />
						</trans-time>
						<!-- 发起方安全节点编号 -->
						<column6>
							<xsl:value-of select="SYS_REQ_SEC_ID" />
						</column6>
						<!-- 全局事件跟踪号 -->
						<column7>
							<xsl:value-of select="SYS_EVT_TRACE_ID" />
						</column7>
						<!-- 子交易序号 -->
						<column8>
							<xsl:value-of select="SYS_SND_SERIAL_NO" />
						</column8>
					</xsl:for-each>
					<xsl:for-each select="/TX/TX_BODY/COMMON/FILE_LIST_PACK">
						<!-- 文件个数 -->
						<column9>
							<xsl:value-of select="FILE_NUM" />
						</column9>
						<!-- 文件名 -->
						<column10>
							<xsl:value-of select="FILE_NAME" />
						</column10>
						<!-- 文件路径 -->
						<column11>
							<xsl:value-of select="FILE_PATH" />
						</column11>
					</xsl:for-each>
				</request-head>
				<request-newbiz>
					<request-underwriting>
						<xsl:for-each select="ENTITY/APP_ENTITY">
							<application>
								<products>
									<product>
										<product-code>
											<xsl:value-of select="Cvr_ID" />
										</product-code>
										<charge-period>
											<xsl:value-of select="Ins_Ddln" />
										</charge-period>
										<charge-year>
											<xsl:value-of select="InsPrem_PyF_Ddln" />
										</charge-year>
										<amount>
											<xsl:value-of select="MainIns_Cvr" />
										</amount>
										<discount-prem>
											<xsl:value-of select="InsPrem_Amt" />
										</discount-prem>
									</product>
								</products>
								<policy-holder>
									<gender>
										<xsl:value-of select="Gnd_Cd" />
									</gender>
									<birthday>
										<xsl:value-of select="Ins_Age" />
									</birthday>
								</policy-holder>
							</application>
						</xsl:for-each>
					</request-underwriting>
				</request-newbiz>
			</infopost-request>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>
